﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls.Charting;
using System.Windows.Controls.Primitives;

namespace EffectiveCapacityReport
{
    public partial class LossByMonth : UserControl
    {


        public LossByMonth()
        {
            InitializeComponent();

            DataSeries r = testChart.DefaultView.ChartArea.DataSeries.ElementAt(0);
            r.Definition.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Red);
            r.Definition.Appearance.PointMark.StrokeThickness = 1;
            r.Definition.Appearance.PointMark.Fill = new SolidColorBrush(Colors.Red);
            r.Definition.Appearance.PointMark.Shape = MarkerShape.Diamond;


            DataSeries e = testChart.DefaultView.ChartArea.DataSeries.ElementAt(1);
            e.Definition.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Yellow);
            e.Definition.Appearance.PointMark.StrokeThickness = 1;
            e.Definition.Appearance.PointMark.Fill = new SolidColorBrush(Colors.Yellow);
            e.Definition.Appearance.PointMark.Shape = MarkerShape.Square;
        }

        

        private void testChart_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {

            LossByMonth l = new LossByMonth();
            List<DataSeries> sl = l.testChart.DefaultView.ChartArea.DataSeries.ToList();


            foreach (DataSeries d in sl)
            {
                d.Definition.ShowItemLabels = true;

            }




            ChildWindow c = new myDialog(l);

            c.Title = "Umm Shaif  Losses(monthly)";

            

            c.Show();
        }
    }
}
